#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
const int N = 1e5 + 10, OUTINDEX=1e9;


int n, m, p;
struct Node
{
    int l, r;
    int cnt, maxv;
}node[N * 4];
struct Segment
{
    int y, r;
}seg[N];

vector<int> nums;


int find(int x){
    int l = 0, r = p;
    while(l < r){
        int mid = l + r + 1 >> 1;
        if(nums[mid] > x){
            r = mid - 1;
        }else{
            l = mid;
        }
    } // <=

    if(x != nums[l]){
        return -1;
    }else{
        return l;
    }

}


int find1(int x){
    int l = 0, r = p;
    while(l < r){
        int mid = l + r >> 1;
        if(nums[mid] < x){
            l = mid + 1;
        }else{
            r = mid;
        }
    }
    return l;
}// >=


int find2(int x){
    int l = 0, r = p;
    while(l < r){
        int mid = l + r + 1 >> 1;
        if(nums[mid] > x){
            r = mid - 1;
        }else{
            l = mid;
        }
    }

    return l;
} // <=

void pushup(int u){
    node[u].cnt = node[u << 1].cnt + node[u << 1 | 1].cnt;
    node[u].maxv = max(node[u << 1].maxv, node[u << 1 | 1].maxv);
}

void build(int u, int l, int r){
    node[u].l = l, node[u].r = r, node[u].cnt = 0, node[u].maxv = 0;
    if(l == r)return;
    int mid = l + r >> 1;
    build(u << 1, l, mid), build(u << 1 | 1, mid + 1, r);
}

void modify(int u, int k, int r){
    if(node[u].l == k && node[u].r == k){
        node[u].maxv = max(node[u].maxv, r);
        node[u].cnt ++;
    }else{
        int mid = node[u].l + node[u].r >> 1;
        if(k <= mid)modify(u << 1, k, r);
        if(k > mid) modify(u << 1 | 1, k, r);
        pushup(u);
    }
}

int get_nums(int u, int l, int r){
    if(node[u].l >= l && node[u].r <= r){
        return node[u].cnt;
    }else{
        int res = 0;
        int mid = node[u].l + node[u].r >> 1;
        if(l <= mid) res += get_nums(u << 1, l, r);
        if(r > mid) res += get_nums(u << 1 | 1, l, r);
        return res;
    }
}


int get_max(int u, int l, int r){
    if(node[u].l >= l && node[u].r <= r){
        return node[u].maxv;
    }else{
        int maxv = 0;
        int mid = node[u].l + node[u].r >> 1;
        if(l <= mid) maxv = max(maxv, get_max(u << 1, l, r));
        if(r > mid) maxv = max(maxv, get_max(u << 1 | 1, l, r));
        return maxv;
    }
}

bool check(int l, int r){
    int k1 = nums[r] - nums[l] + 1;
    int k2 = get_nums(1, l, r);
    if(k1 == k2){
        return true;
    }else{
        return false;
    }
}

int get_ans(int y, int x){
    int ry = find(y), rx = find(x);
    
    if(rx != -1 && ry != -1){
        if(rx - ry <= 1){
            int k1 = get_max(1, ry, ry);
            int k2 = get_max(1, rx, rx);

            if(k2 <= k1){
                if(check(ry, rx)){
                    return 1;
                }else{
                    return -1;
                }
            }else{
                return 0;
            }
        }else{
            int k1 = get_max(1, ry, ry);
            int k2 = get_max(1, rx, rx);
            int k3 = get_max(1, ry + 1, rx - 1);
            if(k1 >= k2 && k2 > k3){
                if(check(ry, rx)){
                    return 1;
                }else{
                    return -1;
                }
            }else{
                return 0;
            }
        }
    }else if(rx == -1 && ry != -1){
        int x1 = find2(x);
        int k1 = get_max(1, ry, ry);
        if(x1 == ry){
            return -1;
        }
        int k2 = get_max(1, ry + 1, x1);
        if(k1 > k2){
            return -1;
        }else{
            return 0;
        }

    }else if(rx != -1 && ry == -1){
        int y1 = find1(y);
        if(y1 == rx){
            return -1;
        }
        int k1 = get_max(1, y1, rx - 1);
        int k2 = get_max(1, rx, rx);
        if(k2 > k1){
            return -1;
        }else{
            return 0;
        }
    }else{ //rx == -1 && ry == -1
        return -1;
    }
    

}


int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);

    scanf("%d", &n);
    for(int i = 0; i < n; i ++){
        int y, r;
        scanf("%d%d", &y, &r);
        seg[i].y = y, seg[i].r = r;
        nums.push_back(y);
    }

    sort(nums.begin(), nums.end());
    nums.erase(unique(nums.begin(), nums.end()), nums.end());

    p = nums.size() - 1;
    build(1, 0, nums.size() - 1);

    for(int i = 0; i < n; i ++){
        int y = find(seg[i].y), r = seg[i].r;
        modify(1, y, r);
    }

    scanf("%d", &m);
    int y, x;
    while(m --){
       scanf("%d%d", &y, &x);
       int res = get_ans(y, x);

       if(res == -1){
            printf("maybe\n");
       }else if(res == 0){
            printf("false\n");
       }else{
            printf("true\n");
       }
    }


    return 0;
}